package com.company;

import java.util.Scanner;

public class fore {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个整数：");
        int s = sc.nextInt();
        if (s < 2) {
            System.out.println("不是素数");
        } else {
            for (int i = 2; i <= s; i++) {
                if (s % i == 0 && s != i) {
                    System.out.println("不是素数");
                    break;
                }else{
                    System.out.println("是素数");
                    break;
                }

            }

        }
    }

}
